package com.zcx.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import com.zcx.service.ITemplateService;
import com.zcx.pojo.Template;
import java.util.List;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zcx
 * @since 2022-04-02
 */
@Controller
@RequestMapping("/template")
    public class TemplateController {

    @Autowired
    ITemplateService templateService;
    @ResponseBody
    @RequestMapping("/list")
    public List<Template> queryAllTemplate(){
        List<Template> templates=templateService.getBaseMapper().selectList(null);
        return templates;
    }
}
